<?php
namespace Modules\User\Http\Requests;
use App\Http\Requests\MyRequest;

class UserInfoRequest extends MyRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
     
            'name' => ['required','max:16'],
            'school_name' => ['required' ],
            'class_name' => ['required' ],
            'sex'=> ['required' ],
            'tel' => ['required' ],
            'pname' => ['required' ],
            
        ];
    }
    public function messages(): array
    {
        return [
            'name.required' => '姓名不能为空',
            'name.max' => '姓名不合法',
            'school_name.required' => '学校不能为空',
            'class_name.required' => '班级不能为空',
            'sex.required' => '性别不能为空',
            'tel.required' => '电话不能为空',
            'pname.required' => '省份不能为空',
        ];
    }
}